Many of us have seen films containing remarkably realistic dinosaurs, aliens, animated toys and other fanciful creatures. Such animations are made possible by computer graphics. Using such techniques, a computer graphics artist can specify how each object should look and how it should change in appearance over time, and a computer then models the objects and displays them on a display such as your television or a computer screen. The computer takes care of performing the many tasks required to make sure that each part of the displayed image is colored and shaped just right based on the position and orientation of each object in a scene, the direction in which light seems to strike each object, the surface texture of each object, and other factors.
Because computer graphics generation is complex, computer-generated three-dimensional graphics just a few years ago were mostly limited to expensive specialized flight simulators, high-end graphics workstations and supercomputers. The public saw some of the images generated by these computer systems in movies and expensive television advertisements, but most of us couldn't actually interact with the computers doing the graphics generation. All this has changed with the availability of relatively inexpensive 3D graphics platforms such as, for example, the Nintendo 64® and various 3D graphics cards now available for personal computers. It is now possible to interact with exciting 3D animations and simulations on relatively inexpensive computer graphics systems in your home or office.
A problem graphics system designers confronted in the past was how to create realistic looking surface detail on a rendered object without resorting to explicit modeling of the desired details with polygons or other geometric primitives. Although surface details can be simulated, for example, using myriad small triangles with interpolated shading between vertices, as the desired detail becomes finer and more intricate, explicit modeling with triangles or other primitives places high demands on the graphics system and becomes less practical. An alternative technique pioneered by E. Catmull and refined by J. F. Blinn and M. E. Newell is to “map” an image, either digitized or synthesized, onto a surface. (See “A Subdivision Algorithm for Computer Display of Curved Surfaces” by E. Catmull, Ph.D. Thesis, Report UTEC-CSc-74-133, Computer Science Department, University of Utah, Salt Lake City, Utah, December 1994 and “Texture and Reflection in Computer Generated Images” by J. F. Blinn and M. E. Newell, CACM, 19(10), October 1976, 452–457). This approach is known as texture mapping (or pattern mapping) and the image is called a texture map (or simply referred to as a texture). Alternatively, the texture map may be defined by a procedure rather than an image.
Typically, the texture map is defined within a 2D rectangular coordinate space and parameterized using a pair of orthogonal texture coordinates such, as for example, (u, v) or (s, t). Individual elements within the texture map are often called texels. At each rendered pixel, selected texels are used either to substitute for or to scale one or more material properties of the rendered object surface. This process is often referred to as texture mapping or “texturing.”
Most 3-D graphics rendering systems now include a texturing subsystem for retrieving textures from memory and mapping the textures onto a rendered object surface. Sophisticated texturing effects utilizing indirect or multiple textures are also possible such as, for example, multi-texturing, meta-textures or texture tiling, but conventional approaches typically involve complex hardware arrangements such as using multiple separate texture retrieval/mapping circuits (units) where the output of one texturing circuit provides the input to a next texturing circuit. Such duplicated circuitry is essentially idle whenever such effects are not used. In on-chip graphics processing implementations, the additional circuitry requires more chip real-estate, can reduce yield and reliability, and may significantly add to the overall production cost of the system. Consequently, a further problem confronting graphics system designers is how to efficiently implement these more sophisticated texturing effects without associated increases in texture mapping hardware complexity.
One solution is to use a single texture addressing/mapping circuit and perform multiple texturing passes. Nominally, this may require at least generating a first set of texture addressing coordinates, accessing a first texture, storing the data retrieved in a temporary storage, and then regenerating the same set of texture coordinates again for use in computing new coordinates when accessing a second texture in the next or a subsequent texturing pass. Although this approach may reduce hardware complexity somewhat, it is fairly time consuming, requires generating/providing the same set of texture coordinates multiple times, and results in inefficient processing during mode changes (e.g., switching between direct and indirect texturing operational modes). Moreover, this approach results in a very course granularity in the data processing flow through the graphics rendering system—significantly affecting polygon fill rate.
To solve this problem and to provide an enhanced repertoire of texturing capabilities for a 3-D graphics system, the present invention provides a versatile texturing pipeline arrangement achieving a relatively low chip-footprint by utilizing a single texture address coordinate/data processing unit that interleaves the processing of logical direct and indirect texture coordinate data and provides a texture lookup data feedback path for “recirculating” retrieved indirect texture lookup data from a single texture retrieval unit back to the texture address coordinate/data processing unit. The interleaved coordinate processing and recirculated/feedback data arrangement of the present invention allow efficient processing of any number of logical direct and/or indirect texture mapping stages from a smaller number of hardware texture processing units while preserving a fine granularity in the overall data processing flow.
In accordance with one aspect provided by the present invention, the recirculating/data-feedback arrangement of the texturing pipeline portion of the graphics processing enables efficient use and reuse of a single texture lookup (retrieval) unit for both logical direct and indirect texture processing without requiring multiple rendering passes and/or temporary texture storage hardware.
In accordance with another aspect provided by the invention, the texture address (coordinate) processing hardware is arranged to perform various coordinate computations based on the recirculated/feedback texture data and to process both direct and indirect coordinate data together in a substantially continuous interleaved flow (e.g., to avoid any “course granularity” in the processing flow of graphics data throughout the system). This unique interleaved processing/data-recirculating texture pipeline arrangement enables efficient and flexible texture coordinate processing and texture retrieval/mapping operations while using a minimum amount of hardware for providing an enhanced variety of possible direct and indirect texturing applications.
In accordance with another aspect provided by this invention, an effectively continuous processing of coordinate data for performing logical direct and indirect texture lookups is achieved by interleaving the processing of both direct and indirect coordinate data per pixel within a single texture coordinate processing hardware unit. For example, a selector can be used to look for “bubbles” (unused cycles) in the indirect texture coordinate stream, and to insert computed texture coordinate data in such “bubbles” for maximum utilization of the texture mapper.
In accordance with yet another aspect provided by the invention, a hardware implemented texturing pipeline includes a texture lookup data feedback path by which the same texture data retrieval unit can be used and reused to:                both lookup direct indirect textures, and        supply indirect texture lookup data.The same texture address (coordinate) processing unit can be used and reused for processing both logical direct and indirect texture coordinate data and computing new/modified texture coordinates.        
In accordance with yet another aspect provided by this invention, a set of texture mapping parameters is presented to a texture mapping unit which is controlled to perform a texture mapping operation. The results of this texture mapping operation are recirculated and used to present a further set of texture mapping parameters which are fed back to the input of the same texture mapping unit. The texture mapping unit performs a further texture mapping operation in response to these recirculated parameters to provide a further texture mapping result.
The first texture mapping operation may comprise an indirect texture mapping operation, and a second texture mapping operation may comprise a direct texture mapping operation. The processing and presentation of texture mapping parameters to a texture mapping unit for performing direct texture mapping operations may be interleaved with the processing and presentation of texture mapping parameters for performing indirect direct texture mapping operations.
In accordance with a further aspect provided by this invention, a method of indirect texture referencing uses indirect texture coordinates to generate a data triplet which is then used to derive texture coordinates. The derived texture coordinates are then used to map predetermined texture data onto a primitive. In accordance with yet a further aspect provided by the invention, the retrieved data triplet stored in texture memory is used to derive a set of modified texture coordinates which are then used to reference texture data stored in the texture memory corresponding to a predetermined texture.
In accordance with yet another aspect provided by this invention, a graphics system includes:                a texture coordinate/data processing unit for interleaved processing of logical direct and indirect coordinate data comprising an arrangement of at least one data multiplier and at least one data accumulator;        a texture data retrieval unit connected to the coordinate/data processing unit, the texture data retrieval unit retrieving texture data stored in a texture memory; and        a data feedback path from a texture data retrieval unit to the texture coordinate/data processing unit to recycle retrieved texture data through the texture coordinate/data processing unit for further processing;        wherein in response to a set of texture coordinates the retrieval unit provides retrieved texture data to the processing unit for deriving modified texture coordinates which are used in mapping a texture to a surface of a rendered image object.        
In accordance with yet another aspect provided by this invention, a texture processing system for selectively mapping texture data corresponding to one or more different textures and/or texture characteristics to surfaces of rendered and displayed images includes a texture coordinate offset matrix arrangement producing a set of offset texture coordinates by multiplying indirect texture data by elements of a matrix, wherein one or more elements of the matrix are a mathematical function of one or more predetermined direct texture coordinates and one or more elements of the matrix can be selectively loaded.
In accordance with yet another aspect provided by this invention, a set of indirect texture coordinates are used to retrieve data triplets stored in texture memory, and a set of modified texture coordinates are derived based at least in part on the retrieved data triplets. The set of modified texture coordinates is then used for retrieving data stored in texture memory. These steps are reiteratively repeated for a predetermined number of data retrievals, and a set of derived texture coordinates resulting from the repetition is used to map predetermined texture data onto a primitive.
In accordance with yet another aspect provided by the invention, a set of generalized API (application program interface) indirect texture mapping functions are defined and supported by the texturing pipeline apparatus which permits specifying arguments for performing at least four indirect-texture operations (indirect lookup stages) and for selectively associating one of at least eight pre-defined textures and one of at least eight pre-defined sets of texture coordinates with each indirect texturing operation. The defined API indirect texture mapping functions also permit specifying texture scale, bias and coordinate wrap factors as well as a variety of texture coordinate offset multiplication matrix configurations and functions for computing new/modified texture lookup coordinates within the texturing pipeline.
In accordance with yet a further aspect provided by the invention, a texture address (coordinate) processing unit transforms retrieved texture color/data from an indirect texture lookup into offsets that are added to the texture coordinates of a regular (non-direct) texture lookup. The feedback path provides texture color/data output from a texture retrieval unit to a texture coordinate processing unit used to generate/provide texture coordinates to the texture retrieval unit.
In accordance with yet a further aspect provided by the invention, a single texture address processing unit comprising at least a pair of FIFO buffers is utilized for interleaving and synchronizing the processing of both “direct” (regular non-indirect) and “indirect” texture coordinates, and a single texture data retrieval unit is used for retrieving and recirculating indirect-texture lookup data back to the texture address processing unit for computing new/modified texture lookup coordinates. In an example embodiment, the retrieved indirect-texture lookup data is processed as multi-bit binary data triplets of three, four, five, or eight bits. The data triplets are multiplied by a 3×2 element texture coordinate offset matrix before being optionally combined with direct coordinate data, or with computed data from a previous cycle/stage of texture address processing, to compute modified offset texture coordinates for accessing a texture map in main memory. Values of the offset matrix elements are programmable and may be dynamically defined for successive processing cycles/stages using selected predetermined constants or values based on direct coordinates. A variety of offset matrix configurations are selectable including at least three offset matrix configurations containing elements based on programmable constants and two “variable” matrix configurations containing elements based on a values from a set of direct texture coordinates. Circuitry for optionally biasing and scaling retrieved texture data is also provided.